#include <stdio.h>
int main()
{
    int a, m, n, q , p  = 1;
    a = 100;
    while (a < 1000){
        m = a / 100;
        n = a / 10 %10;
        q = a % 10;
        if (m*m*m + n*n*n + q*q*q == a){
            printf("%d\n" , a);
            p++;
        } 
        a++;
    }
    return 0;
}

#include <stdio.h>
void printFibonacci(int n){
    int fib1  = 0, fib2 = 1,next;

    for(int i = 1; i <= n;i++){
        printf("%d",fib1);
        next = fib1 + fib2;
        fib1 = fib2;
        fib2 = next;
    }
    printf("\n");
}
int main(){
    int N;
    printf("请输入要输出的斐比那契数的个数N:");
    scanf("%d", &N);
    printfFibonacci(N);
    return 0;
}

#include <stdio.h>
#include <stdbool.h>
bool isPrime(int num){
    if (num <= 1) return false;
    for (int i = 2; i *i <= num; i++){
        if (num %i == 0) return false;
    }
    return true;
}

int main(){
    int number;
    printf("请输入一个整数:");
    scanf("%d", &number);

    if (isPrime(number)){
        printf("%d是素数。\n",number);
    }else{
        printf("%d不是素数。\n",number);
    }
    return 0;
}

#include <stdio.h>
int main(){
    int a, b, n=1;
    while(n<-5){
        a=1,b=1;
        while(a<=5-n){
            printf("");a++;
        }
        while(b<=2*n-1){
            printf("*");b++;
        }
        printf("\n");
        n++;
    }
    return 0;
}

#include <stdio.h>
int gcd(int a,int b);
int lcm(int a,int b);
int main(){
    int num1,num2;
    printf("请输入两个正整数:");
    scanf("%d %d", &num1, &num2);
    scanf("%d %d", &num1 , &num2);
    printf("%d 和 %d 的最小公倍数是 ：%d\n",num1,num2,lcmO(num1,num2));
    return 0;
}

int gcd(int a ,int b){
    while (b!= 0){
        int temp = b;
        b = a%b;
        a = temp;
    }
    return a;
}

int lcm(int a,int b){
    return((a * b) / gcd(a,b));
}

#include <stdio.h>
int main(){
    int n;
    double sum = 0.0;
    printf("请输入正整数n:");
    scanf("%d",&n);
    for(int i = 0; i < n; i++){
        sum += 1.0 / (2*i+1);
    }
    printf(“序列的和为: %.3f\n", sum);
        return 0;

}